﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Collections;

namespace Palsta.Core.Manifest
{
    class RuleSet
    {

        #region Members

        private String name;
        private ArrayList rules = new ArrayList();  //of Rule

        #endregion

        #region Constructors

        public RuleSet() : this("")
        {
        }

        public RuleSet(String name)
        {
            this.name = name;
        }

        #endregion

        #region Accessors

        public virtual String Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }


        public virtual ArrayList Rules
        {
            get
            {
                return this.rules;
            }
            set
            {
                this.rules = value;
            }
        }
        #endregion

        #region Methods

        #endregion

        #region Override Operators

        public static Boolean operator ==(RuleSet rs, String name)
        {
            return rs.Equals(name);
        }

        public static Boolean operator !=(RuleSet rs, String name)
        {
            return !rs.Equals(name);
        }

        public override bool Equals(object o)
        {
            if (o is String)
            {
                return this.name.Equals((String)o);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return 0;
        }

        #endregion

        #region Static Methods

        public static RuleSet Parse(XmlNode node)
        {
            return null;
        }

        #endregion
    }
}
